package com.manage.competition.repository;

import com.manage.competition.entity.CompetitionScore;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * Create with IDEA
 *
 * @Author: gitee.com/KamisamaXX
 * @Date: Create in 22:32 2019/4/10
 * @Description:
 */
public interface CompetitionScoreRepository extends JpaSpecificationExecutor<CompetitionScore>, JpaRepository<CompetitionScore,Long> {
    CompetitionScore findByTeacherIdAndUserIdAndQuestionsId(long teacherId, long userId, long questionId);
    List<CompetitionScore> findByUserIdAndTeacherIdAndCompetitionId(long userId,long teacherId, long competitionId);
    List<CompetitionScore> findByUserIdAndCompetitionIdAndQuestionsId(long userId,long competitionId,long questionId);
}
